﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Http;

using TMShopClient.Interface;

namespace Tavis.Scripting {
    public static class HttpContentExtensions {

        public static IScript ReadAsScript(this HttpContent content) {
            if (content.ContentType == "application/python") {
                return new PythonScript(content.ReadAsString());
            }
            return null;
        }
    }
}
